package com.aos.iot.protocol.hll.client;

import com.aos.iot.socket.common.ack.AckManager;
import com.aos.iot.socket.common.client.ClientBoxFactor;
import com.aos.iot.socket.common.handler.SocketClient;
import com.aos.iot.socket.common.protocol.IProtocol;
import com.aos.iot.socket.common.store.StoreFactory;
import com.aos.iot.protocol.hll.message.HllMessage;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class HllClient extends SocketClient<HllMessage> {

    private String clientId;

    public HllClient(ChannelHandlerContext channelHandlerContext, IProtocol<HllMessage> protocol, StoreFactory<HllMessage> storeFactory, AckManager ackManager, ClientBoxFactor clientBoxFactor) {
        super(channelHandlerContext, protocol, storeFactory, ackManager, clientBoxFactor);
    }

    @Override
    public void disconnect() {
        super.disconnect();
        log.info("client leave [{}{}] ", getChannelId(), getRemoteAddress());
    }

    @Override
    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

}
